package com.digitalconsulting.datalayer;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class MySQLiteHelper extends SQLiteOpenHelper 
{
	private static final String DATABASE_NAME = "Shopaholic.db";
	private static final int DATABASE_VERSION = 1;
	
	public MySQLiteHelper(Context context)
	{
		super(context, DATABASE_NAME, null, DATABASE_VERSION);
	}

	@Override
	public void onCreate(SQLiteDatabase db)
	{
		// ItemList
		String createTransakcija = "CREATE TABLE ItemList" +
	       "(ItemListId INTEGER PRIMARY KEY AUTOINCREMENT," +
	       "Price REAL, Place TEXT, Description TEXT, ImagePath TEXT, Date TEXT, Longitude TEXT, Latitude TEXT)";
		db.execSQL(createTransakcija);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
	{
		
	}
}
